﻿using Equipment_manage.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Equipment_manage.Controllers
{
    public class FristController : Controller
    {
        //
        // GET: /Frist/
        public ActionResult Index()
        {
            Equipment DB=new Equipment();
            ViewBag.P_cout =DB.Employees.Count();
            ViewBag.D_cout = DB.DecivesInfo.Count();
            ViewBag.w_cout = DB.RepairApply.Where(p => p.ra_Approval == 1 && p.ra_AllocationPerson == 1 && p.ra_Status == "未完成").ToList().Count;
            ViewBag.x_cout = DB.RepairApply.Where(p => p.ra_Approval == 0 && p.ra_AllocationPerson == 0 && p.ra_Status == "未完成").ToList().Count;
            return View();
        }
	}
}